import React from 'react'
import T from 'prop-types'
import './index.scss'

// 对话输入框
export default function ImageCard(props) {
  const { imgUrl } = props

  return (
    <div className={'image-card'}>
      {imgUrl && imgUrl
        .split(',')
        .map((item, index) =>
          item !== 'data:image/jpeg;base64' ? (
            <img src={`data:image/jpeg;base64,${item}`} alt="=_=" />
          ) : (
            ''
          )
        )}
    </div>
  )
}

ImageCard.propTypes = {
  imgUrl: T.string,
}
